<extend name="Base/common"/>

<block name="style">
<link href="__CSS__/stylesheet.css" rel="stylesheet">
<link href="__CSS__/product_stylesheet.css" rel="stylesheet">
</block>

<block name="script">
<script type="text/javascript" src="__JS__/banner.js"></script>
<script type="text/javascript">
$(function(){
	$('nav .tools li').eq(0).remove();
	
	$('.sub-menu').hover(function(){
		$(this).find('ul').removeClass('hidden');
	}, function(){
		$(this).find('ul').addClass('hidden');
	});
});
</script>
</block>

<block name="header">
<header>
	<div class="container">
		<section class="menu-top">
			<div class="fl">
				<section class="header-logo-search">
					<div class="logo fl">
						<img src="__IMG__/logo.png"/>
					</div>
					<div class="search form-group fl">
						<form action="" method="post" autocomplete="off">
							<div class="dropdown fl">
								<a data-toggle="dropdown" href="javascript:;">商品</a>
								<ul class="dropdown-menu">
									<li><a href="javascript:;" data-id="putong">商品</a></li>
									<li><a href="javascript:;" data-id="paipin">拍品</a></li>
									<li><a href="javascript:;" data-id="xianzhi">闲置</a></li>
								</ul>
							</div>
							<input name="type" type="hidden" value="putong">
							<input name="title" type="text" class="search-text" />
							<a href="javascript:;" class="search-btn fr">搜 索</a>
							<script type="text/javascript">
							$(function(){
								$('.dropdown li a').click(function(){
									self = $(this), type = $('.search input[name="type"]');
									$('.dropdown > a').text(self.text());
									type.val(self.attr('data-id'));
								});
							});
							</script>
						</form>
					</div>
				</section>
				<section class="header-ad">
					<img src="__IMG__/header_ad.png">
				</section>
			</div>
	        <div class="fr qrecode">
	            <img src="__IMG__/QRcode.png"/>
	        </div>
        </section>
        <div class="sub-menu fl">
			<a class="sub-menu-top" href="#">全部商品分类</a>
			<ul class="hidden">
				<volist name=":getCategoryTree()" id='vo'>
						<li>
						<a  class="title" href="{:U('Index?fid='.$vo['id'])}">{$vo.title}</a>
						<div class="sub-menu-list">
							<volist name="vo._child" id="child">
								 <a href="{:U('Index?cid='.$child['id'])}">{$child.title}</a>
					 		</volist>
						</div>
						</li>
				</volist>
			</ul>
		</div>
		<div class="sub-nav">
	       	<ul>
	       		<li><a href="{:U('Index/index')}">首页</a></li>
	       		<li><a href="{:U('Identify/index')}">鉴真宝</a></li>
	       		<li><a href="{:U('Pzb/index')}">拍真宝</a></li>
	       		<li><a href="{:U('Qgh/index')}">抢购会</a></li>
	       		<li><a href="{:U('Pzg/index')}">拍照购</a></li>
	       		<li><a href="{:U('Xlw/index')}">选礼物</a></li>
	       		<li><a href="{:U('Xz/index')}">闲置</a></li>
	       	</ul>
	    </div>
	</div>
</header>
</block>

<block name="body">
<div class="container main">
	<ul class="category-nav">
		<volist name="category_tree" id="category">
		<li>
			<label>{$category.title}</label>
			<ul class="list-item">
				<volist name="category._child" id="child">
				<li><a href="{:U('Index?cid='.$child['id'])}">{$child.title}</a></li>
				</volist>
			</ul>
		</li>
		</volist>		
	</ul>
	<p class="filter"><label>商品筛选：</label>
	<notempty name="cur_category_list">
	<volist name='cur_category_list' id="vo">
	<span class="filter-name">{$vo.title}</span>
	</volist>
	<else />
	全部
	</notempty>
	</p>
</div>
<div class="container main">
	<div class="col-xs-12 list">
		<div class="row">			
			<volist name="product_list" id="vo">
			<div class="col-xs-3 form-group">
				<a href="{:U('Product/detail',array('id'=>$vo['id']))}" target="" title="{$vo.title}">
					<img src="__ROOT__{$vo.image_path}" />
					<p>{$vo.title||msubstr=0,40,'utf-8',false}</p>
					<span class="price">￥{$vo.price}<del>￥{$vo.price}</del></span>
				</a>
			</div>
			</volist>
		</div>
		<div class="page center">{$_page}</div>
	</div>
</div>
</block>